//
//  AppDelegate.m
//  抽屉效果与UIPageViewController协作
//
//  Created by apple on 15/9/24.
//  Copyright © 2015年 戴维营. All rights reserved.
//

#import "AppDelegate.h"
#import "LeftViewController.h"
#import "CententViewController.h"
#import "MMDrawerController.h"

@interface AppDelegate ()


@end

@implementation AppDelegate


- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    
    self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
    
    LeftViewController *leftViewCtrl = [LeftViewController new];
    
    CententViewController *cententCtrl = [[CententViewController alloc] init];

    MMDrawerController *drawerCtrl = [[MMDrawerController alloc] initWithCenterViewController:cententCtrl leftDrawerViewController:leftViewCtrl];
    
    drawerCtrl.openDrawerGestureModeMask = MMOpenDrawerGestureModeAll;
    
    drawerCtrl.closeDrawerGestureModeMask = MMCloseDrawerGestureModeAll;
    
    self.window.rootViewController = drawerCtrl;
    
    [self.window makeKeyAndVisible];
    
    return YES;
}

@end
